package com.quan.mall.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;


/**
 * <p>
 * 电商-商品SKU表(SKU是SPU的一种详细说明，一个商品有多个SKU)
 * </p>
 *
 * @author 杨浩泉
 * @since 2018-11-09
 */
@Table(name = "tb_mall_goods_sku")
public class MallGoodsSku implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	/**
	 * 商品ID
	 */
	@Column(name = "goods_id")
	private Long goodsId;

	/**
	 * SKU编号,唯一
	 */
	@Column(name = "sku_no")
	private String skuNo;

	/**
	 * SKU属性[1:1,2:3]表示 "颜色为黑色,尺码为X
	 */
	@Column(name = "sku_spec")
	private String skuSpec;

	/**
	 * 售价
	 */
	private BigDecimal price;

	/**
	 * 库存
	 */
	private Integer stock;

	/**
	 * SKU销量
	 */
	private Integer sale;

	/**
	 * 创建时间
	 */
	private Date ctime;

	/**
	 * 最后更新时间
	 */
	private Date utime;


			
	/**
	 * 获取ID
	 */
	public Long getId() {
		return id;
	}
	
	/**
	 * 设置ID
	 */
	public void setId(Long id) {
		this.id = id;
	}
			
	/**
	 * 获取商品ID
	 */
	public Long getGoodsId() {
		return goodsId;
	}
	
	/**
	 * 设置商品ID
	 */
	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}
			
	/**
	 * 获取SKU编号,唯一
	 */
	public String getSkuNo() {
		return skuNo;
	}
	
	/**
	 * 设置SKU编号,唯一
	 */
	public void setSkuNo(String skuNo) {
		this.skuNo = skuNo;
	}
			
	/**
	 * 获取SKU属性[1:1,2:3]表示 "颜色为黑色,尺码为X
	 */
	public String getSkuSpec() {
		return skuSpec;
	}
	
	/**
	 * 设置SKU属性[1:1,2:3]表示 "颜色为黑色,尺码为X
	 */
	public void setSkuSpec(String skuSpec) {
		this.skuSpec = skuSpec;
	}
			
	/**
	 * 获取售价
	 */
	public BigDecimal getPrice() {
		return price;
	}
	
	/**
	 * 设置售价
	 */
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
			
	/**
	 * 获取库存
	 */
	public Integer getStock() {
		return stock;
	}
	
	/**
	 * 设置库存
	 */
	public void setStock(Integer stock) {
		this.stock = stock;
	}
			
	/**
	 * 获取SKU销量
	 */
	public Integer getSale() {
		return sale;
	}
	
	/**
	 * 设置SKU销量
	 */
	public void setSale(Integer sale) {
		this.sale = sale;
	}
			
	/**
	 * 获取创建时间
	 */
	public Date getCtime() {
		return ctime;
	}
	
	/**
	 * 设置创建时间
	 */
	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}
			
	/**
	 * 获取最后更新时间
	 */
	public Date getUtime() {
		return utime;
	}
	
	/**
	 * 设置最后更新时间
	 */
	public void setUtime(Date utime) {
		this.utime = utime;
	}

	@Override
	public String toString() {
    	return "UpmsUser{" +
        	"id=" + id +
	            	", goodsId=" + goodsId +
	            	", skuNo=" + skuNo +
	            	", skuSpec=" + skuSpec +
	            	", price=" + price +
	            	", stock=" + stock +
	            	", sale=" + sale +
	            	", ctime=" + ctime +
	            	", utime=" + utime +
	        "}";
	}

}
